<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      .father {
        --border: 1px solid red;
        --border: none;
        border: var(--border);
      }

      .father .son {
        border: var(--border);
      }

      .father span {
        border: var(--border);
      }
    </style>
  </head>
  <body>
    <div class="father">
      <span>父盒子</span>
      <div class="son">子盒子</div>
    </div>
  </body>
</html>
